package jmine.tec.hydra.export;

import java.util.ArrayList;
import java.util.List;

import jmine.tec.hydra.domain.specification.HydraScheduledSpecification;
import jmine.tec.hydra.services.incluir.HydraScheduledSpecificationService;
import jmine.tec.services.api.export.AbstractServiceFillerEntityExporter;
import jmine.tec.services.api.export.DefaultExportAction;

/**
 * Exportador de HydraScheduledSpecification
 * 
 * @author lundberg
 * @deprecated use jmine.tec.scheduling
 */
@Deprecated
public class HydraScheduledSpecificationExporter extends AbstractServiceFillerEntityExporter<HydraScheduledSpecification> {

    /**
     * Construtor
     */
    public HydraScheduledSpecificationExporter() {
        super(new HydraScheduledSpecificationService(), DefaultExportAction.INCLUIR);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<Object> exportBefore(HydraScheduledSpecification entity) {
        List<Object> before = new ArrayList<Object>(super.exportBefore(entity));
        if (entity.getSenderRegistry() != null) {
            before.add(entity.getSenderRegistry());
        }
        return before;
    }
}
